package com.lwl.myProject.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.lwl.myProject.domain.User;
import com.lwl.myProject.service.UserService;

/**   
 * @标题: HelloController.java 
 * @包名: com.lwl.myProject.controller 
 * @描述: hello
 * @作者: wenlei.liao 
 * @时间: 2018年9月13日 下午5:18:54 
 * @版权: (c) 2018, witon
*/
@RestController
public class HelloController {
	
	@Autowired
	private UserService userService;
	
	@RequestMapping(value="/hello")
	public String hello(){
		return "Hello Spring Boot!";
	}

	@ResponseBody
	@RequestMapping(value="/getUser")
	public List<User> getUserList(){
		return userService.getUserList();
	}
}
